import { App, Directive } from 'vue'
import scrollFade from './modules/scrollFade' //动画淡出
import scrollAnimate from './modules/scrollAnimate' //动画淡出1
import scrollFull from './modules/scrollFull' //动画淡出2
import scrollTitle from './modules/scrollTitle'
const directivesList: { [key: string]: Directive } = {
  scrollFade,
  scrollAnimate,
  scrollFull,
  scrollTitle,
}

const directives = {
  install: function (app: App<Element>) {
    Object.keys(directivesList).forEach((key) => {
      app.directive(key, directivesList[key])
    })
  },
}

export default directives
